package cn.service.Impl;

import cn.dao.PrivilegeDao;
import cn.domain.Privilege;
import cn.service.PrivilegeService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Administrator on 2017/3/23 0023.
 */
@Service
@Transactional
public class PrivilegeServiceImpl implements PrivilegeService {

    @Resource
    private PrivilegeDao privilegeDao;
    @Override
    public List<Privilege> findAll() {
        return privilegeDao.findAll();
    }

    @Override
    public Privilege getById(Long id) {
        return privilegeDao.getById(id);
    }

    @Override
    public void update(Privilege privilege) {
        privilegeDao.update(privilege);
    }

    @Override
    public List<Privilege> privilege(Long[] id) {
        return privilegeDao.getByIds(id);
    }

    @Override
    public List<Privilege> privilegeTop() {
        return privilegeDao.privilegeTop();
    }

}
